﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReturnScrap.aspx.cs" Inherits="HQWeb.LibarySys.ReturnScrap" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../Styles/Site.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript">
        function AddDate() {
            var Scrap = new Object();
            Scrap.APPLICANT = document.getElementById("hidApplicant").value;
            Scrap.BRANCH_ID = document.getElementById("hidBranchID").value;
            Scrap.LIBRARY_ID = document.getElementById("hidLibraryID").value;
            Scrap.MATERIAL_ID = document.getElementById("hidMaterialID").value;
            Scrap.TITEL = document.getElementById("applytitel").value;
            Scrap.REMARK = document.getElementById("Remark").value;
            Scrap.NUM = document.getElementById("hidNum").value;
            Scrap.MATERIAL_NAME = document.getElementById("hidMaterialName").value;
            Scrap.APPLICANT_NAME = document.getElementById("hidApplicantName").value;
            //Scrap.APPROVER = <%=Session["USER_ID"].ToString() %>;
            //Scrap.APPROVER_NAME = <%=Session["USER_NAME"].ToString() %>;
            Scrap.FLAG = "1";
            Scrap.STATE = "3";
            HQWeb.LibarySys.LibraryServer.AddScrap(Scrap, ReScrap, failedCallback);
        }

        function ReScrap(obj) {
            if (obj == -2) {
                top.location.href = '../Login/Login.aspx';
            }
            else {
                SelectClick(obj);
            }
        }

        //客户端异常处理
        function failedCallback(error) {
            alert(error.get_message());
        }

        //保存返回结果
        function SaveResout(resout) {
            if (resout == "") {
                alert("保存成功！");
                document.getElementById("apply").disabled = true;
            } else {
                alert(resout);
            }
        }

        function SelectClick(objidvalue) {
            var obj = new Object();
            obj.id = objidvalue;
            parent.window.returnValue = obj;
            parent.window.close();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
     <asp:ScriptManager ID="ScriptManager1" runat="server">
        <Services>
            <asp:ServiceReference Path="LibraryServer.asmx" />
        </Services>
    </asp:ScriptManager>
    <div>
        <div>
            <table width="98%">
                <tr>
                    <td colspan="4" class="title">
                        <asp:Label runat="server" ID="labTitle" Text="报废申请表单"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 20%">
                        标 题 ：
                    </td>
                    <td colspan="3">
                        <input type="text" runat="server" id="applytitel" /><span style="color: Red">*</span>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 20%">
                        店 名 ：
                    </td>
                    <td>
                        <asp:Label ID="BranchName" runat="server">
                        </asp:Label>
                    </td>
                    <td align="right" style="width: 20%">
                        仓库名 ：
                    </td>
                    <td>
                        <asp:Label ID="LibrayName" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        元素名称 ：
                    </td>
                    <td>
                        <asp:Label runat="server" ID="MaterialName"></asp:Label>
                    </td>
                    <td align="right" style="width: 20%">
                        报废数量：
                    </td>
                    <td style="width: 30%">
                        <asp:Label runat="server" ID="MaterialNum"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="width: 20%" align="right">
                        申请人:
                    </td>
                    <td>
                        <asp:Label runat="server" ID="Applicants"></asp:Label>
                    </td>
                    <td align="right" style="width: 20%">
                        审批人：
                    </td>
                    <td style="width: 30%">
                        <asp:Label runat="server" ID="Approver"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 20%">
                        备 注：
                    </td>
                    <td colspan="3">
                        <%-- <asp:Label runat="server" Width="70%"  ID="txtRemark"></asp:Label>--%>
                        <asp:TextBox runat="server" Width="70%" TextMode="MultiLine" ID="Remark"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td colspan="3">
                     &nbsp;&nbsp;&nbsp;&nbsp;<%--<asp:Button ID="btnPass" runat="server" Text="确 定" OnClick="btnPass_Click"  />--%>
                     <input type="button" runat="server" value="确 定" onclick="AddDate()" />
                    </td>
                </tr>
            </table>
        </div>
        </div>
        <div style="display: none">
                <%--<asp:HiddenField ID="hidType" runat="server" Value="add" />--%>
                <asp:HiddenField ID="hidApplicant" runat="server" />
                <asp:HiddenField ID="hidPid" runat="server" />
                <asp:HiddenField ID="hidMaterialID" runat="server" />
                <asp:HiddenField ID="hidLibraryID" runat="server" />
                <asp:HiddenField ID="hidBranchID" runat="server" />
                <asp:HiddenField ID="hidNum" runat="server" />
                <asp:HiddenField ID="hidMaterialName" runat="server" />
                <asp:HiddenField ID="hidApplicantName" runat="server" />
            </div>
    </form>
</body>
</html>
